import { v4 as uuidv4 } from 'uuid'

export const getUserTempId = () => {
  let userTempId = localStorage.getItem('userTempId')
  
  //如果本地储存中没有的话就要先生成一份

  if (!userTempId) {
    localStorage.setItem('userTempId',uuidv4())
  }

  //返回数据

  return userTempId
}